<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<p:dataTable id="dataPesquisa" value="#{empresaBean.retornoListaPessoa}"
	var="pesEmpresa" paginator="true" rows="6">

	<p:column headerText="Codigo">
		<h:outputText value="#{pesEmpresa.idPessoa}" />
	</p:column>

	<p:column headerText="Nome Fantasia">
		<h:outputText value="#{pesEmpresa.fantasia}" />
	</p:column>

	<p:column headerText="CNPJ">
		<h:outputText value="#{pesEmpresa.cnpj}" />
	</p:column>

	<p:column headerText="Selecionar">
		<p:commandLink id="link" value="Selecionar"
			action="#{tituloBens.selecionaEmpresa}" ajax="dialogEmpresa">
			<f:setPropertyActionListener value="#{pesEmpresa.idPessoa}"
				target="#{tituloBens.empresaSelecionada}" />
		</p:commandLink>
	</p:column>

</p:dataTable>
</html>